﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.ActiveRecord;
using CostTrade.Core.Data;
using Natrue.Data.FastMapping;

namespace CostTrade.BusinessLayer
{
    /// <summary>
    /// 出口单内容
    /// </summary>
    [ActiveRecord("tbExportWares"), Serializable]
    public class ExportWares : CBBase
    {
        private readonly Guid primaryKey = Guid.NewGuid();
        [PrimaryKey(PrimaryKeyType.Assigned, "ROWGUID", Access = PropertyAccess.NosetterCamelcase),Mark("")]
        public override Guid PrimaryKey
        {
            get { return primaryKey; }
        }

        /// <summary>
        /// 商品
        /// </summary>
        private Wares exportWare;
        /// <summary>
        /// 成本价
        /// </summary>
        private double costPrice;
        /// <summary>
        /// 销售价
        /// </summary>
        private double sellPrice;
        /// <summary>
        /// 装箱数
        /// </summary>
        private int inBoxCount;
        /// <summary>
        /// 每箱商品数量
        /// </summary>
        private int everyBoxCount;
        /// <summary>
        /// 商品总数
        /// </summary>
        private int wareCount;
        /// <summary>
        /// 商品总价
        /// </summary>
        private double totalPrice;
        /// <summary>
        /// 点货数
        /// </summary>
        private int faceGoodsCount;

        /// <summary>
        /// 商品
        /// </summary>
        [BelongsTo, Mark("商品")]
        public Wares ExportWare
        {
            get { return exportWare; }
            set { exportWare = value; }
        }

        /// <summary>
        /// 成本价
        /// </summary>
        [Property, Mark("成本价")]
        public double CostPrice
        {
            get { return costPrice; }
            set { costPrice = value; }
        }

        /// <summary>
        /// 销售价
        /// </summary>
        [Property, Mark("销售价")]
        public double SellPrice
        {
            get { return sellPrice; }
            set { sellPrice = value; }
        }

        /// <summary>
        /// 装箱数
        /// </summary>
        [Property, Mark("装箱数")]
        public int InBoxCount
        {
            get { return inBoxCount; }
            set { inBoxCount = value; }
        }

        /// <summary>
        /// 每箱商品数量
        /// </summary>
        [Property, Mark("每箱商品数量")]
        public int EveryBoxCount
        {
            get { return everyBoxCount; }
            set { everyBoxCount = value; }
        }

        /// <summary>
        /// 商品总数
        /// </summary>
        [Property, Mark("商品总数")]
        public int WareCount
        {
            get { return wareCount; }
            set { wareCount = value; }
        }

        /// <summary>
        /// 商品总价
        /// </summary>
        [Property, Mark("商品总价")]
        public double TotalPrice
        {
            get { return totalPrice; }
            set { totalPrice = value; }
        }

        /// <summary>
        /// 点货数
        /// </summary>
        [Property, Mark("点货数")]
        public int FaceGoodsCount
        {
            get { return faceGoodsCount; }
            set { faceGoodsCount = value; }
        }
    }
}